﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YuanLiaoDaoHuo_MingXi.aspx.cs" Inherits="syc.Sale.YuanLiaoDaoHuo_MingXi" %>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <script type="text/javascript" language="javascript" src="/common.js"></script>
     <div id="wintop" class="wintop">管材到货登记明细</div> 
      <asp:Panel ID="Panel1" runat="server" CssClass="panel">
        <asp:Button ID="Button2" runat="server" CssClass="button" 
                onclick="Button2_Click" Text="返回" UseSubmitBehavior="False" />
      </asp:Panel>    

<script>    putBillHead();</script>
 <table border="0" cellpadding="4" 
          style="width:880px;border-collapse: collapse;font-size:14px; padding:20px;">
	        <tr>
		        <td class="bill_title" colspan="4" align="center" >
		        <u>管材到货明细<asp:SqlDataSource 
                        ID="SqlDataSource3" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                        SelectCommand="SELECT [ID], [名称] FROM [生产单位]"></asp:SqlDataSource>
                </u></td>
	        </tr>	           
        </table>  
        </br> 
          <div>
          <table align="center">
           <tr>
		        <td class="bill_title" colspan="4" align="center" >		     
		       </td>
		       <td  colspan="4" align="center" >		        
		           车号：<%=this.DropDownList1.Text %><asp:DropDownList ID="DropDownList1" runat="server" 
                       DataSourceID="SqlDataSource2" DataTextField="车号" DataValueField="车号" style="visibility:hidden"
                      >
                   </asp:DropDownList>
                </td>
		       <td  colspan="4" align="left" >
		           日期：<%=this.DropDownList2.Text.Substring(0,10) %><asp:DropDownList ID="DropDownList2" runat="server" 
                       DataSourceID="SqlDataSource2" DataTextField="到货日期" DataValueField="到货日期" 
                       DataTextFormatString="{0:d}"  style="visibility:hidden">
                   </asp:DropDownList>
                </td>
		        <td class="bill_title" colspan="4" align="center" >		        
		       </td>
	        </tr>	 
	        </table>    
          </div>
    <asp:GridView ID="GridView" runat="server" AllowPaging="True" 
                             AutoGenerateColumns="False" CssClass="grid" 
                            DataSourceID="SqlDataSource2" 
                            GridLines="None" AllowSorting="True" 
                            UseAccessibleHeader="False" Width="880px" 
         DataKeyNames="ID" onrowdatabound="GridView_RowDataBound" 
         ShowFooter="True" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <FooterStyle BorderStyle="Solid" HorizontalAlign="Center" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" Visible="false"
             ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="20px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="20px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="名称" HeaderText="品名" SortExpression="名称" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="规格" HeaderText="规格或型号" SortExpression="规格" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center">
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="炉号" HeaderText="炉号" SortExpression="炉号" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="批次" HeaderText="批次" SortExpression="批次" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="重量" HeaderText="名义重量(t)" SortExpression="重量" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="磅重" HeaderText="实际磅重(t)" SortExpression="磅重" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="支数" HeaderText="支数" SortExpression="支数" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="区域" HeaderText="存放区域" SortExpression="区域" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField>  
            <asp:BoundField DataField="备注" HeaderText="备注" SortExpression="备注" 
            ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
             ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" >
            <HeaderStyle CssClass="grid-header"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" CssClass="grid" Width="80px"></ItemStyle>
            </asp:BoundField> 
           
        </Columns>
    </asp:GridView>
    
  <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
   ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"                                 
   SelectCommand="select 管材到货明细.车号,管材到货明细.到货日期,管材到货明细.ID,管材到货明细.管材到货登记ID,原料.品名 AS 名称,原料.规格,管材到货明细.炉号, 管材到货明细.批次, 管材到货明细.重量, 管材到货明细.磅重, 管材到货明细.支数, 管材到货明细.区域, 管材到货明细.备注 from 管材到货明细 INNER JOIN 原料 ON 管材到货明细.原料ID = 原料.ID where 管材到货明细.管材到货登记ID=@管材到货登记ID">
    <SelectParameters>
             <asp:QueryStringParameter DefaultValue="" Name="管材到货登记ID" QueryStringField="ID" 
                 Type="Int32" />
         </SelectParameters>
   </asp:SqlDataSource>
     <script>     putBillFoot();</script>
           
       
    <script>
        var gb = document.getElementById("gridback");
        var gf = document.getElementById("gridframe");
        gb.style.width = gf.clientWidth + "px";
        gb.style.height = gf.clientHeight + "px";
        
    </script>
    
    </asp:Panel>

      <script>
          var textboxs = document.getElementsByTagName("input");
          for (var i = 0; i < textboxs.length; i++) {
              if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                  textboxs[i].onfocus = function(e) { this.select(); };
              }
          }
    </script>

    </form>
      </body>
</body>
</html>
